<?php
/**
 * Created by PhpStorm.
 * User: HeiYanHeiMao
 * Date: 2020/2/27
 * Time: 17:32
 */

namespace app\model;


use think\facade\Db;

class CategoryModel
{
    private static $baseTable = 'eb_category'; // 商品分类表

    /**商户获取商品分类列表
     * @return \think\response\Json
     */
    public static function storeGetList()
    {
        try {
            $info = Db::table(self::$baseTable)->field('id,name')->select()->toArray();
            return jsonSuccess('获取成功', $info);
        } catch (\Exception $e) {
            return jsonFail('服务内部错误~');
        }
    }
}